@import "variables";
@import "mixins/mixins";

.api-doc-title {
  color: #3d3e3e;
  font-size: 26px;
  font-weight: bold;
  margin: 0 0 22px;
}

.api-categories {
  margin-bottom: 30px;
  @include clearfix;
  .api-category_btn {
    display: block;
    float: left;
    padding: 0 17px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 12px;
    text-decoration: none;
    line-height: 24px;
    color: #666;
    margin-right: 12px;
    margin-bottom: 10px;
    transition: all .2s;
    &:hover {
      opacity: .7;
    }
    &.active {
      border-color: $primary-color;
      color: $primary-color;
    }
  }
}

.api-select_label {
  font-weight: bold;
  font-size: 14px;
  color: #3d3e3e;
  margin-right: 16px;
  > .iconfont {
    margin-right: 4px;
  }
}

.api-select-sort {
  overflow: hidden;
  .api-ss_label {
    position: relative;
    display: block;
    float: left;
    padding-left: 15px;
    font-size: 12px;
    line-height: 20px;
    color: #666;
    &:before {
      position: absolute;
      content: "";
      width: 5px;
      height: 5px;
      left: 5px;
      top: 9px;
      background-color: $primary-color;
    }
  }
  .api-ss-content {
    float: left;
    margin-left: 10px;
    line-height: 20px;
    > a {
      color: #999;
      font-size: 12px;
      text-decoration: none;
      vertical-align: top;
      & + a {
        margin-left: 16px;
      }
      &:hover {
        opacity: .6;
      }
      &.selected {
        color: $primary-color;
      }
    }
  }
}

.api-service-row {
  @include clearfix;
  margin: 0 -8px;
  overflow: hidden;
}

.api-service-col {
  float: left;
  width: 20%;
  padding: 0 8px;
  box-sizing: border-box;
}

.api-service-list {
  margin-bottom: 30px;
  .api-service {
    position: relative;
    margin-bottom: 16px;
    border: 1px solid $default-border-color;
    border-radius: 5px;
    padding-top: 50px;
    transition: all 0.2s;
    overflow: hidden;
    &:hover {
      box-shadow: 0px 10px 10px -5px $default-border-color;
      .api-service-inner {
        transform: translateY(-10px);
      }
      .el-btn-apply {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }
  .api-service-inner {
    transform: translateY(0px);
    transition: transform .2s linear;
  }
  .api-service-info {
    display: block;
    width: 90px;
    margin: 0 auto;
    text-decoration: none;
    .pic {
      width: 100%;
      height: 90px;
    }
    .name {
      color: $second-color;
      font-size: 14px;
      text-align: center;
      font-weight: bold;
      margin: 0 0 8px;
    }
  }
  .price {
    color: #ff5441;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin: 0 0 10px;
  }
  .el-btn-apply {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.3s ease-in;
  }
}

.api-select-bar {
  margin-bottom: 30px;
  overflow: hidden;
  .api-select-bar_input {
    float: left;
    overflow: hidden;
  }
  .el-form-group_search {
    .el-form-control {
      font-size: 12px;
      border-top-left-radius: 15px;
      border-bottom-left-radius: 15px;
    }
    .el-form-group_append {
      border-top-right-radius: 15px;
      border-bottom-right-radius: 15px;
      cursor: pointer;
    }
  }
  .api-select-sorts {
    float: right;
    padding: 5px 0;
    .api-select-sort {
      float: left;
      & + div {
        margin-left: 60px;
      }
    }

  }
  .api-select_label {
    display: inline-block;
    line-height: 30px;
    vertical-align: top;
  }
  .el-form-group {
    width: 280px;
    height: 30px;
    vertical-align: top;
  }
}